package com.example.a10908.retorfitrxjava.presenter;

import com.example.a10908.retorfitrxjava.callback.LoginCallBack;
import com.example.a10908.retorfitrxjava.model.ILoginModel;
import com.example.a10908.retorfitrxjava.model.bean.LoginBean;
import com.example.a10908.retorfitrxjava.ui.view.ILoginView;

/**
 * Created by 10908 on 2016/12/16.
 */

public class Presenter_Login implements LoginCallBack {
    private ILoginView iLoginView;
    private ILoginModel iLoginModel;

    public Presenter_Login(ILoginView iLoginView) {
        this.iLoginView = iLoginView;
        iLoginModel = new ILoginModel(this);
    }

    public void setiLoginInfo(String name, String password) {
        iLoginModel.startLoginRequest(name, password);
    }

    @Override
    public void getLoginCallBack(LoginBean loginBean) {
        iLoginView.loginState(loginBean);
    }
}
